using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MB.MyShare.DAL.SqlClient
{
   class SqlRegisterProviderEx : SqlRegisterProvider
   {
      public override RegisteredUser CreateUser(string username, string password, string firstname,
          string lastname, string email, int zip, int dob, 
          bool isApproved, out MembershipCreateStatus status)
      {
         if (username.ToLower() == password.ToLower())
         {
            status = MembershipCreateStatus.InvalidPassword;
            return null;
         }
//         else if (username.ToLower() == *another username*)
//         {
//             status = MembershipCreateStatus.InvalidUsername;
//             return null;
//         }
         else
         {
            return base.CreateUser(username, password, firstname, lastname, 
               email, zip, dob, isApproved, out status);
         }
      }
   }
}
